<div class="main-container col2-right-layout">
    <div class="main">                        
        <div class="col-main" style="width: 705px">
            <div class="border-1">
                <div class="border-2">
                    <div class="main-indent">
                        <div id="messages_product_view"></div>
                        <div class="product-view">
                            <div class="product-essential">
                                <div class="no-display">
                                    <input type="hidden" name="product" value="7" />
                                    <input type="hidden" name="related_product" id="related-products-field" value="" />
                                </div>

                                <div class="product-shop" style="height:380px; border-bottom: 1px solid #CCC;">
                                    <div class="product-name">
                                        <h1><?php echo $model->name ?></h1>
                                    </div>

                                    <div class="product-image-view">
                                        <a href="<?php echo Yii::app()->baseUrl; ?>/uploads/images/products/<?php echo $model->image ?>" rel="gal1" class="jqzoom" title="<?php echo $model->name ?>">  
                                            <img src="<?php echo Yii::app()->baseUrl; ?>/uploads/images/products/thumb/<?php echo $model->thumb ?>" title="<?php echo $model->name ?>" width="256">  
                                        </a>                                        
                                    </div>

                                    <div class="product-price-view">
                                        <div class="product-status">Tình trạng: Còn hàng</div>
                                        <div class="product-price-content">Giá: <?php echo number_format($model->price, 0, ' ', ' ') . " VNĐ"; ?></div>
                                    </div>
                                    
                                    <div class="product-add-to-cart-view">
                                        <a href="<?php echo Yii::app()->createUrl('cart/add', array('id' => $model->id)) ?>" style="color: #7f7f7e" title="Thêm vào giỏ hàng">Add to cart</a>
                                    </div>

                                    <div class="product-long-desc-view"><?php echo $model->long_desc; ?></div>
                                    
                                    <div class="more-view">
                                        <ul id="thumblist" class="clearfix" >
                                        <?php   
                                            $i=0;
                                            foreach ($moreViews as $key => $value):
//                                                $activeZoom = ($i==0) ? 'zoomThumbActive' : '';
                                                $url = Yii::app()->baseUrl . "/uploads/images/products/" . $value->image_base_url."/small/".$value->image_name;
                                                $image = CHtml::image($url, 'Bấm vào để xem hình', array());
                                                echo CHtml::openTag('li');
                                                    echo CHtml::link($image, 'javascript:void(0)', array(
                                                        'rel' => "{gallery: 'gal1', smallimage: '".Yii::app()->baseUrl."/uploads/images/products/".$value->image_base_url."original/".$value->image_name."',largeimage: '".Yii::app()->baseUrl."/uploads/images/products/".$value->image_base_url."original/".$value->image_name."'}",
                                                        'class' => $activeZoom,
                                                    ));
                                                echo CHtml::closeTag('li');                                                 
                                                $i++;         
                                            endforeach;
                                        ?>
                                        </ul>
                                    </div>
                                    
                                    <div class="social-place">                                        
                                    </div>
                  
                                </div>
                                
                                <div class="product-collateral">
                                    <?php $this->widget('application.components.relativeProductWidget', array(
                                        'category_id' => $model->category_id,
                                        'id' => $model->id
                                    )); ?>
                                    <!-- san pham lien quan here -->
                                </div>                                            
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- randon san pham -->
            <div class="col-right sidebar">
                    <div class="border-1">
                        <div class="border-2">
                            <div class="block block-related">
                                <div class="block-title"><strong>Sản phẩm khác</span></strong>
                                </div>
                                <div class="block-content">
                                    <?php 
                                        $this->widget('application.components.RandomProductWidget', array(
                                            'category_id' => $model->category_id
                                        )); 
                                    ?>                                    
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            <!-- ket thuc randon san pham -->
        </div>
    </div>
</div>

<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl ?>/css/jquery.jqzoom.css" media="all" />
<script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery-1.6.min.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery.jqzoom-core.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
	$('.jqzoom').jqzoom({
            zoomType: 'standard',
            lens:true,
            preloadImages: false,
            alwaysOn:false
        });
	
});
</script>
